<%--
/*
- * @description: 订单成功显示页
- * @author: huangchuting
- * @update: huangchuting (2021/1/8 20:40)
- */--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>校园租赁-订单提交成功</title>
</head>
<link rel="stylesheet" href="/static/css/orderCommit.css">
<body>
    <c:import url="../public/head.jsp"></c:import>
    <script>
        shop.innerHTML = '<span>·&#12288;订单详情</span>'
    </script>
    <div class="divWarp">
        <div class="contentWarp">
                <table>
                    <tr>
                        <th>订单编号</th>
                        <th>商品名称</th>
                        <th>订单价格</th>
                        <th>收货人</th>
                        <th>收货地址</th>
                        <th>联系电话</th>
                        <th>下单时间</th>
                        <th>当前状态</th>
                        <th>操作</th>
                    </tr>

                    <tr>
                        <td>${orderNew.order_id}</td>
                        <td>${orderNew.item_name}</td>
                        <td>${orderNew.order_price}</td>
                        <td>${orderNew.consignee}</td>
                        <td>${orderNew.addr}</td>
                        <td>${orderNew.contact_way}</td>
                        <td>${orderNew.creat_time}</td>

                        <c:if test="${orderNew.order_state==1}">
                            <td><span style="color: crimson">[未完成]</span></td>

                        </c:if>
                        <c:if test="${orderNew.order_state==0}">
                            <td><span>[已完成]</span></td>
                        </c:if>
                        <td>
                            <c:if test="${orderNew.order_state==1}">
                                <c:if test="${orderNew.getUser_id() != sessionScope.user_id || sessionScope.admin_id != null}">
                                    <div class="Btn" style="background: darkgray">删除订单</div>
                                </c:if>
                                <c:if test="${orderNew.getUser_id()== sessionScope.user_id}">
                                    <a href="#"><div class="Btn">删除订单</div></a>
                                </c:if>


                        </c:if>
                        <c:if test="${orderNew.order_state==0}">
                            <c:if test="${sessionScope.admin_id != null}">
                                <a href="/Order/userDeleteOrder?order_id=${orderNew.order_id}"><div class="Btn">删除订单</div></a>
                            </c:if>
                            <c:if test="${sessionScope.admin_id == null}">
                                <div class="Btn" style="background: darkgray">删除订单</div>
                            </c:if>
                        </c:if>

                            <c:if test="${orderNew.getUser_id() != sessionScope.user_id}">
                                <a href="#"><div class="Btn">联系买家</div></a>
                            </c:if>
                            <c:if test="${orderNew.getUser_id()== sessionScope.user_id}">
                                <a href="#"><div class="Btn">联系卖家</div></a>
                            </c:if>
                            <c:if test="${sessionScope.admin_id != null}">

                            </c:if>



                        </td>
                    </tr>
                </table>
        </div>
    </div>
</body>
</html>